<%@ page import="java.util.Date" %>
<%--
  Created by IntelliJ IDEA.
  User: onion
  Date: 2018/7/17
  Time: 23:40
  To change this template use File | Settings | File Templates.
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
<%@ taglib prefix="f" uri="WEB-INF/timeformat.tld" %>
<%--
  Created by IntelliJ IDEA.
  User: onion
  Date: 2018/7/17
  Time: 23:40
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <jsp:include page="/WEB-INF/jsp/css.jsp"/>
    <style>
        h3{
            text-align: center;
        }
    </style>
</head>
<body>
<jsp:include page="../header.jsp" />
<div class="container">
    <div class="table-responsive" style="overflow:hidden;">
        <h3>修改员工信息</h3>
        <form class="form-horizontal" role="form" action="update.html" method="post">
            <input type="hidden" value="${emp.id}" name="id">
            <div class="form-group">
                <label for="firstname" class="col-sm-2 control-label">名字</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" id="firstname"
                           placeholder="请输入名字" name="name" value="${emp.name}">
                </div>
            </div>
            <div class="form-group">
                <label for="idcard_no" class="col-sm-2 control-label">身份证号码</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" id="idcard_no"
                           placeholder="您的身份证号码" name="idCardNo" value="${emp.idCardNo}">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">性别</label>
                <div class="col-sm-10">
                    <label class="checkbox-inline">

                        <input type="radio" name="gender" value="0" <c:if test="${emp.gender == 0}">checked="checked"</c:if> /> 男</label>
                    <label class="checkbox-inline">
                        <input type="radio" name="gender" value="1" <c:if test="${emp.gender == 1}">checked="checked"</c:if> /> 女</label>
                    <label class="checkbox-inline">
                        <input type="radio" name="gender" value="2" <c:if test="${emp.gender == 2}">checked="checked"</c:if> /> 其他</label>
                </div>
            </div>
            <!-- 出生日期html -->
            <div class="form-group">

                <label for="date" class="col-sm-2 control-label">
                    <f:tformat date_="${emp.birth}" format="yyyy-MM-dd" />
                </label>
                <div class="col-sm-10">
                    <input type="date" class="form-control" id="date" name="birth" value="${emp.birth}"/>
                </div>
            </div>
            <div class="form-group">
                <label for="hiredate" class="col-sm-2 control-label">雇佣日期</label>
                <div class="col-sm-10">
                    <%--<jsp:setProperty property="time" name="dateObject" value="${emp.hiredate}"/>--%>
                    <input type="date" class="form-control" id="hiredate" name="hiredate" value="2017-08-05"/>
                </div>
            </div>
            <div class="form-group">
                <label for="leavedate" class="col-sm-2 control-label">离职日期</label>
                <div class="col-sm-10">
                    <%--<fmt:formatDate pattern="yyyy-MM-dd" value="${emp.leavedate}" />--%>
                    <input type="date" class="form-control" id="leavedate" name="leavedate" value="${emp.leavedate}"/>
                </div>
            </div>

            <div class="form-group">
                <label for="status" class="col-sm-2 control-label">状态</label>
                <div class="col-sm-10">
                    <select class="form-control" name="status" id="status">
                        <option value="1">在职</option>
                        <option value="0">离职</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-offset-4 col-sm-10">
                    <button type="submit" class="btn btn-default" style="padding:6px 90px;">修改</button>
                    <button type="submit" class="btn btn-default" style="padding:6px 90px;">取消</button>
                </div>
            </div>
        </form>
    </div>
</div>
</body>
</html>

